home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 104 / MacAddict_104_2005-04.iso / Software / Utilities / PasswordPress 1.1 freeware.dmg / PasswordPress / dev / Test.java < prev   
Encoding:
Java Source  |  2004-11-03  |  721 b   |  26 lines

  1. import com.unearthedjava.passwordPress.UnearthedPassword;
  2.  
  3. /**
  4.  * @author Larry Bullock
  5.  *
  6.  * A test class to show UnearthedPassword in use as a component.
  7.  */
  8. public class Test {
  9.     public static void main(String[] args) {
  10.         try 
  11.         {
  12.                UnearthedPassword test = new UnearthedPassword(10, // length required
  13.                                                               false, // allow duplicate characters
  14.                                                               false, // mix letter case
  15.                                                               UnearthedPassword.IS_ALPHANUM); // alphanumeric
  16.                String password = test.getNewPassword();
  17.                System.out.println(password);
  18.         }
  19.         catch (Exception e)
  20.         {
  21.             System.out.println(e.getMessage());
  22.         }
  23.  
  24.     }
  25. }
  26.